package datastructures;

import node.ArrayNode;
import node.Insertable;
import structure.Heap;

/**
 *
 * @author Vojta
 */
public class HeapMain {

    public static void main(String[] args) {
        Heap ds = new Heap();
        for (int i = 0; i < 10; i++) {
            Insertable in = new ArrayNode(i);
            ds.add(in);
        }

        long startTime = System.nanoTime();
        ds.buildHeap();
        long endTime = System.nanoTime() - startTime;
        System.out.println((float) endTime / (1000f * 1000f * 1000f));
        System.out.println(ds.toString());
    }

}
